using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using BVMB.DataLayer.BusinessObjects;
using BVMB.DataLayer.Base;

namespace BVMB.DataLayer.ManagerObjects
{
    public partial interface IChiTietBaoCaoThangManager : IManagerBase<BVMB.DataLayer.BusinessObjects.ChiTietBaoCaoThang, int>
    {
		// Get Methods
		IList<ChiTietBaoCaoThang> GetByMaBaoCaoThang(System.Int32 baoCaoThang);
    }

    partial class ChiTietBaoCaoThangManager : ManagerBase<BVMB.DataLayer.BusinessObjects.ChiTietBaoCaoThang, int>, IChiTietBaoCaoThangManager
    {
		#region Constructors
		
		public ChiTietBaoCaoThangManager() : base()
        {
        }
        public ChiTietBaoCaoThangManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<ChiTietBaoCaoThang> GetByMaBaoCaoThang(System.Int32 baoCaoThang)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(ChiTietBaoCaoThang));
			
			
			ICriteria baoCaoThangCriteria = criteria.CreateCriteria("BaoCaoThang");
            baoCaoThangCriteria.Add(NHibernate.Criterion.Expression.Eq("Id", baoCaoThang));
			
			return criteria.List<ChiTietBaoCaoThang>();
        }
		
		#endregion
    }
}